<%@ Page Language="C#" MasterPageFile="~/Views/Shared/MarkItUp.Master" Inherits="System.Web.Mvc.ViewPage<Wikey.Entity.Page>" %>

<%@ Import Namespace="Wikey.Utilities.Extensions" %>
<asp:Content ID="Content2" ContentPlaceHolderID="Main" runat="server">
  <% Html.RenderPartial("PageJavascript", ViewData.Model); %>
   
  
  <div style="float: left; width: 80%">
    <h1>
      <%= ViewData.Model.Name %>
    </h1>
   <div id="PageTagList">
      <ul >
        <% if (null != ViewData.Model.TagList){ foreach (var tag in ViewData.Model.TagList) { %>
          <li>
            <%= Html.ActionLink( tag.Name , tag.Name , "Tag") %>
          </li>
        <%}} %>
      </ul>
    </div>
    <div class="section">
      <% Html.RenderPartial("PageContent", ViewData.Model);%>
    </div>
    <br />
    <div id="PageParts">
      <div id="CommentSection" style="float: left; width: 40%;" class="section">
        <% Html.RenderPartial("PageComments", ViewData.Model); %>
      </div>
     
    </div>
  </div>
  
   <div style="float: right; width: 17%;height:100%;border-left:solid 1px #666;padding-left:5px;" >
     <br /> <% if (ViewData.Model.CreatedBy == null) {%>
                        Anonymous is the creator
                      <%} else {%>
                      <a title="<%= ViewData.Model.CreatedBy.Name %>" href="<%= Html.ResolveUrl("~/My/" + ViewData.Model.CreatedBy.Credential.Username) %>">
                       <img src='<%=Html.ResolveUrl(String.Format("~/Uploads/Users/{0}" , ViewData.Model.CreatedBy.Picture)) %>' />
                       </a> 
                        <%= Html.ActionLink(ViewData.Model.CreatedBy.Name, ViewData.Model.CreatedBy.Credential.Username, "My")%>
                       is the creator
                        <%} %> 
    <br /> <% if (ViewData.Model.ModifiedBy == null) {%>
                        Anonymous
                      <%} else {%>
                      <a title="<%= ViewData.Model.ModifiedBy.Name %>" href="<%= Html.ResolveUrl("~/My/" + ViewData.Model.CreatedBy.Credential.Username) %>">
                       <img src='<%=Html.ResolveUrl(String.Format("~/Uploads/Users/{0}" , ViewData.Model.ModifiedBy.Picture)) %>' />
                       </a>
                       <%= Html.ActionLink(ViewData.Model.ModifiedBy.Name, ViewData.Model.ModifiedBy.Credential.Username, "My")%>
                        <%} %> is the last modifier.
    <% Html.RenderPartial("PageMenu", ViewData.Model); %>
    <a href="javascript:AddContent()"> Add Content </a>
    <div id="DocumentsSection" >
      <% Html.RenderPartial("PageDocuments", ViewData.Model); %>
    </div>
     <% Html.RenderPartial("PageChildren", ViewData.Model); %>
    </div>
    
</asp:Content>
